﻿using System;
using Ionic.Zip;

namespace SvnDeploy.Service.Impl
{
    internal class ZipAdapterImpl : IZipAdapter
    {
        public void ZipFolder(string pathFrom, string pathTo)
        {
            using (var zip = new ZipFile())
            {
                zip.UseUnicodeAsNecessary = true;
                zip.AddDirectory(pathFrom);
                zip.Comment = "This zip was created at " + DateTime.Now.ToString("G");
                zip.Save(pathTo);
            }
        }
    }
}
